<!DOCTYPE html>
<html>
    <head>
        <title>标题页</title>
        <script language="javascript">
            function getError()
            {
                try
                {
                 x =new test;                        //产生错误。
                }
                catch(e)
                {
                   document.write(e.description)     //打印错误结果.
                }
            }
        </script>
    </head>
    <body onload="getError()" >
    </body>
</html>
